<html xmlns:component="http://flashjs/component">
	<head>
		<script src="../../libs/LibScriptLoader.js"></script>
	</head>
	<body>
		<script>
			Lib.require("../../libs/jquery/jquery-1.4.2.js", true);

			function addNewDiv() {
                var component = Component.wrapPathToElement("./components/a", "aInstance2");
                var container = document.getElementById("container");
                container.aInstance2 = component;
				container.appendChild(component);
			}
		</script>
		<div onclick="addNewDiv()">asdasd</div>
		
		<div id="container">
			<script type="component" source="./components/a" id="a1Instance"></script>
			<!-- script type="component" source="./components/b" id="b1Instnace"></script -->
		</div>
		
		<script>
			Lib.require("component", true);
		</script>
		<script>
			alert('h');
			/*console.log(this);
			console.log(document.getElementById("container"));
			console.log(document.getElementById("bInstance"));*/
		</script>
	</body>
</html>
